package com.coder.oj.admin.dto;

import com.coder.oj.common.validate.ValidationGroups;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class OauthDto implements Serializable {

    @ApiModelProperty("主键id")
    @NotNull(message = "主键id不能为空", groups = {ValidationGroups.Update.class})
    private Long id;

    @ApiModelProperty("角色名称")
    @NotBlank(message = "角色名称不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String name;

    @ApiModelProperty("状态")
    @NotNull(message = "状态不能为空", groups = {ValidationGroups.Update.class})
    private Integer status;

    @ApiModelProperty("请求方式")
    @NotBlank(message = "请求方式不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String rest;

    @ApiModelProperty("权限标识")
    @NotBlank(message = "权限标识不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String mark;

    @ApiModelProperty("所属分组")
    @NotBlank(message = "所属分组不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String collect;
}
